|
Cytosim
PI
Cytoskeleton Simulator
|
FiberLocus is used to refer to the entire segment of a Fiber.
It is used to calculate the distance to this segment, or the intersection of the segment with a plane.
The only mysterious thing is the name: why Locus?
Public Member Functions | |
| FiberLocus () | |
| construct without initialization | |
| FiberLocus (Fiber const *f, int r) | |
| constructor | |
| Fiber const * | fiber () const |
| the Fiber | |
| unsigned int | point () const |
| index of segment | |
| real | len () const |
| the length of the segment | |
| Vector | pos1 () const |
| position of first point in space | |
| Vector | pos2 () const |
| position of second point in space | |
| Vector | diff () const |
| that is pos2() - pos1() | |
| Vector | dir () const |
| that is ( pos2() - pos1() ).normalized() | |
| Vector | center () const |
| that is [ pos2() + pos1() ] / 2 | |
| PointExact | exact1 () const |
| PointExact corresponding to first point. | |
| PointExact | exact2 () const |
| PointExact corresponding to second point. | |
| bool | isFirst () const |
| true if the segment is the first of the Fiber | |
| bool | notFirst () const |
| true if the segment is not the first of the Fiber | |
| bool | isLast () const |
| true if the segment is the last of the fiber | |
| bool | notLast () const |
| true if the segment is not the last of the fiber | |
| void | projectPoint0 (Vector const &w, real &abs, real &dist) const |
calculate the projection of w on the line supporting the segment More... | |
| void | projectPoint (Vector const &w, real &abs, real &dist) const |
calculate the projection of w on the line supporting the segment More... | |
| void | projectPointF (const real[], real &abs, real &dist) const |
| faster projectionPoint, but incompatible with periodic boundary conditions More... | |
| int | intersectPlane (Vector const &n, real a, real &abs) const |
| find the intersection with the plane defined by n.x + a = 0 More... | |
| bool | projectSegment (FiberLocus const &that, real &a, real &b, real &dist) const |
| calculates the closest distance between the two lines supporting the segments More... | |
W is projected on the line that supports this FiberLocus The function calculates:
It is assumed here that len() returns the distance between the two points of the FiberLocus Attention: dis may not be set if ( abs < 0 ) or ( abs > len() )
W is projected on the line that supports this FiberLocus The function calculates:
It is assumed here that len() returns the distance between the two points of the FiberLocus Attention: dis is not set if ( abs < 0 ) or ( abs > len() )
This is a faster version of projectPoint(), but it does not work with periodic boundaries
| bool projectSegment | ( | FiberLocus const & | that, |
| real & | abs1, | ||
| real & | abs2, | ||
| real & | dist | ||
| ) | const |
Set dis to be the square of the minimum distance between the two lines. In 2D, the distance should be zero unless the two lines are parallel.
Abscissa abs1 and abs1 are set to indicate the points realizing this distance. The return value is true if both projections fall inside the segments.